<?php 
$sql =	"SELECT
			  c.page_id,
			  d.title,
			  d.description,
			  d.meta_key,
			  d.meta_description	
		  FROM
			  pages AS c,
			  page_description AS d,
			  sef_url AS s
		  WHERE
		  
			  c.page_id = d.page_id
			  AND
			  d.lang_id = '".$_SESSION['lang_id']."'
			  
			  AND
				c.page_id = s.query
				AND
				s.lang_id = '".$_SESSION['lang_id']."'
				AND s.tamplate = 'page'
			 
			  AND
				s.sef_url = 'collections' 
		  ";
$result = query($sql);
$row = mysql_fetch_object($result);


head(sth($row->title),sth($row->meta_description),sth($row->meta_key));


?>
		
		<section id="content" class="cf">
   	
		<?php 
		
				$sql = "SELECT
				c.category_id,
				c.sef_url AS class,
				d.Name,
				s.sef_url
				
				
				
			FROM
				category AS c,
				category_description AS d,
				sef_url AS s
			WHERE
				s.query = c.category_id
				
				AND
				
				c.category_id = d.category_id
				
				AND
				s.tamplate='collcategory'
				
				AND
				
				d.lang_id = '".$_SESSION['lang_id']."'
				
				AND
				
				s.lang_id = '".$_SESSION['lang_id']."'
				
				AND c.type = 'collection'
				
				AND c.published
				
				
				ORDER BY  c.order_number DESC
				
			  ";
			$result = query($sql);
			
			while ($row = mysql_fetch_object($result)) {
				
				
				
				
		?>
        <div class="gr1 left table-display">
            <a href="<?=HTML_BASE.$_SESSION['lang']?>/collections/<?=$row->sef_url?>" class="<?=$row->class?>">
               <span><?=$row->Name?></span>
            </a>
        </div>
        
       
        
        
        <?php }
		
		
				$sql = "SELECT
				c.category_id,
				c.sef_url AS class,
				d.Name,
				s.sef_url
					
			FROM
				category AS c,
				category_description AS d,
				sef_url AS s
			WHERE
				s.query = c.category_id
				
				AND
				
				c.category_id = d.category_id
				
				AND
				s.tamplate='category'
				
				AND
				
				d.lang_id = '".$_SESSION['lang_id']."'
				
				AND
				
				s.lang_id = '".$_SESSION['lang_id']."'
				
				AND c.type = 'project'
				
				AND c.category_id = '6'
				
				
				ORDER BY  c.order_number DESC
				
			  ";
			$result = query($sql);
			
			$row = mysql_fetch_object($result);
		
		
		?>
		 <div class="gr1 left table-display">
            <a href="<?=HTML_BASE.$_SESSION['lang']?>/projects/<?=$row->sef_url?>" class="<?=$row->class?>">
                <span><?=$row->Name?></span>
            </a>
        </div>
 </section>

<?php
foot();
?>